<%--
  Created by IntelliJ IDEA.
  User: evans
  Date: 2018/3/15
  Time: 下午5:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no" />
    <meta name="theme-color" content="#000000" />
    <title>Soico</title>
    <link rel="stylesheet" href="../../css/main.827f7436.css" />
    <link rel="stylesheet" href="../../css/materialize.min.css" />
    <link rel="stylesheet" href="../../css/App.css">
    <link rel="stylesheet" href="../../css/Header.css">
    <script type="text/javascript" async="" src="../../js/common/recaptcha__zh_cn.js"></script>
    <script type="text/javascript" src="../../js/common/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="../../js/common/materialize.min.js"></script>
</head>
<body>
<div id="root">
    <div style="background-color: rgb(250, 250, 250); min-height: 100vh; min-width: 1000px; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;">
        <div>
            <div class="s-alert-wrapper"></div>
            <%@include file="top.jsp"%>
            <div class="container">
                <div class="row pageContainer">
                    <div class="loadingContainer hidden">
                        <div class="loadIndicator preloader-wrapper active">
                            <div class="spinner-layer spinner-blue">
                                <div class="circle-clipper left">
                                    <div class="circle"></div>
                                </div>
                                <div class="gap-patch">
                                    <div class="circle"></div>
                                </div>
                                <div class="circle-clipper right">
                                    <div class="circle"></div>
                                </div>
                            </div>
                            <div class="spinner-layer spinner-red">
                                <div class="circle-clipper left">
                                    <div class="circle"></div>
                                </div>
                                <div class="gap-patch">
                                    <div class="circle"></div>
                                </div>
                                <div class="circle-clipper right">
                                    <div class="circle"></div>
                                </div>
                            </div>
                            <div class="spinner-layer spinner-yellow">
                                <div class="circle-clipper left">
                                    <div class="circle"></div>
                                </div>
                                <div class="gap-patch">
                                    <div class="circle"></div>
                                </div>
                                <div class="circle-clipper right">
                                    <div class="circle"></div>
                                </div>
                            </div>
                            <div class="spinner-layer spinner-green">
                                <div class="circle-clipper left">
                                    <div class="circle"></div>
                                </div>
                                <div class="gap-patch">
                                    <div class="circle"></div>
                                </div>
                                <div class="circle-clipper right">
                                    <div class="circle"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div></div>
                    <h5 class="pageTitle"><span>忘记密码</span></h5>
                    <div class="imgCenter" style="text-align: center; margin: 30px;">
                        若您不小心忘记了您的密码，别担心！请您输入您的邮箱地址，我们会为您重新激活。
                    </div>
                    <form id="forgetPassword" class="col s6 offset-s3 card">
                        <div class="row">
                            <div class="input-field col s12">
                                <input type="email" name="email" value="" class="validate email" id="email" />
                                <span class="red-text hide">请输入正确邮箱</span>
                                <label for="email" class="">Email</label>
                            </div>
                        </div>
                        <div class="col s5 offset-s7" style="margin-bottom: 20px;">
                            <button id="submit" class="btn waves-effect waves-light signInBtn col s12"><span>发送</span></button>
                        </div>
                    </form>
                </div>
            </div>
            <footer class="page-footer">
                <%@include file="footer.jsp"%>
            </footer>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function(){

        $("#forgetPassword input").on("blur",function(){
            var obj = $(this);
            var vals = $(this).val();
            if(vals==''){
                obj.siblings("label").removeClass("active")
            }
            checkForm(obj);
        });
        $("#forgetPassword input").on("focus",function(){
            var obj = $(this);
            obj.siblings("label").addClass("active")
        });

        function checkForm(obj){ // #tbInfoBox
            if($(obj).hasClass("email")){

                var email=(obj).val().trim();
                if(!isEmail(email)){

                    $(obj).siblings(".red-text").removeClass("hide");
                    return false;
                }else{
                    $(obj).siblings(".red-text").addClass("hide");
                }
            }


            return true;
        }

        $("#submit").click(function(){
            var objArray = $("#forgetPassword input");
            var objArrayLen = objArray.length;
            for(var i = 0; i < objArrayLen; i++){
                flagForm = checkForm($(objArray[i]));
                if(!flagForm){
                    return false;
                }
            }
            $("#forgetPassword").submit();
        })
    })
</script>
</body>
</html>
